/** @file error_console.h
    @brief Error console widget */
#ifndef ERROR_CONSOLE_H
#define ERROR_CONSOLE_H

#include <QtGui/QTextBrowser>
#include "logger.hpp"

QT_BEGIN_NAMESPACE

class ErrorConsole: public QTextBrowser {
public:
    ErrorConsole( QWidget * parent = 0 );

    /**
        @brief Reports to the error console
        @param[in] r_section Reference to the section name
        @param[in] r_text Reference to the text to be reported
    */
    void report( const std::string &r_section, const std::string &r_text );

protected:
    std::string m_history;
};

QT_END_NAMESPACE

#endif // ERROR_CONSOLE_H

